#!/usr/bin/env python3
# coding:utf-8
for i in range(1,10):
 for k in range(1,10-i):
     print(end="       ")
 for j in range(1,i+1):
     product=i*j
     print("%d*%d=%2d" % (i,j,product),end=" ")
 print (" ")

print (" ")
print ("-" * 40 )
print (" ")

for o in range(1,10):
 for p in range(1,o+1):
     print("%d*%d=%2d" % (o,p,o*p),end=" ")
 print (" ")

print (" ")
print ("-" * 40 )
print (" ")

for a in range(1,10):
    for b in range(1,10):
     print("%d*%d=%2d" % (a, b, a*b),end=" ")
    print("")
